import tkinter as tk
import tkinter.messagebox 

window = tk.Tk()
window.title("小A君")
window.geometry("200x200")

def hit_me():
    #tk.messagebox.showinfo(title="hi",message="hahaha")
    #tk.messagebox.showwarning(title="hi",message="nonono")
    #tk.messagebox.showerror(title="hi",message="sasasa")
    print(tk.messagebox.askquestion(title="hi",message="sasasa"))
    #return yes or no
    print(tk.messagebox.askyesno(title="hi",message="sasasa"))
    #return True ro False
tk.Button(window,text="Hit_me",command=hit_me).pack()

window.mainloop()
'''不断循环刷新'''

